package ram;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.InetAddress;
import java.net.Socket;

public class ManagerSend {

    public static void enviaMensagem(InetAddress addr, Mensagem msg) throws IOException {
        Socket socket = new Socket(addr, Manager.PORTA);

        ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());
        out.writeObject(msg);
        out.flush();
        out.close();

        socket.close();
    }

}
